//
//  ClassifyDetailTabelViewCell.m
//  A段项目,漫画
//
//  Created by dllo on 15/4/22.
//  Copyright (c) 2015年 dllo. All rights reserved.
//

#import "ClassifyDetailTabelViewCell.h"
#define WIDTH [[UIScreen mainScreen] bounds].size.width
@implementation ClassifyDetailTabelViewCell
-(instancetype)initWithStyle:(UITableViewCellStyle)style reuseIdentifier:(NSString *)reuseIdentifier
{
    
    self = [super initWithStyle:style reuseIdentifier:reuseIdentifier];
    if (self) {
        self.titleLabel = [[UILabel alloc] init];
        [self.contentView addSubview:self.titleLabel];
        [_titleLabel release];
        self.titleLabel.numberOfLines = 0;
        self.titleLabel.font = [UIFont systemFontOfSize:16];
        
        
        self.typeLabel = [[UILabel alloc] init];
        [self.contentView addSubview:self.typeLabel];
        [_typeLabel release];
        self.typeLabel.font = [UIFont systemFontOfSize:13];
        
        
        self.lastupLabel = [[UILabel alloc] init];
        [self.contentView addSubview:self.lastupLabel];
        [_lastupLabel release];
        self.lastupLabel.font = [UIFont systemFontOfSize:13];
        
        
        self.grade_aveLabel = [[UILabel alloc] init];
        [self.contentView addSubview:self.grade_aveLabel];
        [_grade_aveLabel release];
        self.grade_aveLabel.font = [UIFont systemFontOfSize:13];
        
    }
    
    return self;
}



- (void)layoutSubviews
{
    [super layoutSubviews];
    CGFloat bili1 = 107 / 80.0;
    
    self.myImageView.frame = CGRectMake(0, 0, WIDTH / 4.5, WIDTH / 4.5 * bili1);
    self.myImageView.center = CGPointMake(WIDTH / 4.5 / 2 + 10, WIDTH / 4.5 * bili1 / 2 + 10);
    
    self.myImageView.layer.borderWidth = 1.5;
    self.myImageView.layer.cornerRadius = 10;
    self.myImageView.layer.borderColor = [UIColor clearColor].CGColor;
    self.myImageView.layer.masksToBounds = YES;
    
    
    self.titleLabel.frame = CGRectMake(WIDTH / 4.5 + 30, 5, WIDTH - (WIDTH / 4.5 + 40), 40);
    
    self.grade_aveLabel.frame = CGRectMake(WIDTH / 4.5 + 30, 50, WIDTH - (WIDTH / 4.5 + 40), 20);
    
    self.typeLabel.frame = CGRectMake(WIDTH / 4.5 + 30, 70, WIDTH - (WIDTH / 4.5 + 40), 20);
    
    self.lastupLabel.frame = CGRectMake(WIDTH / 4.5 + 30, 90, WIDTH - (WIDTH / 4.5 + 40), 20);
    
    
}





- (void)dealloc
{
    [super dealloc];
}



@end
